// @flow
import React, { Component } from 'react'
import styles from './FaultActions.css'
import { Button } from 'antd'

type Props = {
  refreshFaults: Function,
  data: Object,
  history: Object
}
class FaultActions1 extends Component {
  props: Props
  deleteFault: Function
  constructor (props: Props) {
    super(props)
    this.deleteFault = this.deleteFault.bind(this)
  }

  deleteFault () {
    // const { data } = this.props
    // console.log(data)
  }
  render () {
    const { history, data } = this.props
    return (
      <div className={styles['actions']}>
        <Button
          size='small'
          type='primary'
          style={{ marginRight: '10px' }}
          onClick={() => {
            history.push({
              pathname: '/business/fault-edit',
              state: {
                data
              } })
          }}
          >
          编辑
        </Button>
      </div>
    )
  }
}

export default FaultActions1
